package com.meatball.game.data

import com.alibaba.fastjson2.annotation.JSONField
import io.swagger.v3.oas.annotations.media.Schema

@Schema(description = "投票结果")
data class Vote (
        @Schema(description = "玩家头像", example = "https://meatball.org.cn:8000/images/2024/03/07/v2-6b9ade8a3dce476f0c56e9a52aa89d8b_r.jpg")
        val avatar: String = "",
        @Schema(description = "玩家名称", example = "李明")
        val name: String = "",
        @Schema(description = "候选人ID", example = "bb1df893f6b445ca81ca10e6749958e0")
        val candidate: String = "",
        @Schema(description = "候选人头像", example = "https://meatball.org.cn:8000/images/2024/03/07/v2-6b9ade8a3dce476f0c56e9a52aa89d8b_r.jpg")
        @get:JSONField(name = "candidate_avatar")
        @set:JSONField(name = "candidate_avatar")
        var candidateAvatar: String = "",
        @Schema(description = "候选人游戏角色", example = "")
        @set:JSONField(name = "candidate_game_role")
        @get:JSONField(name = "candidate_game_role")
        var candidateGameRole: String = "",
        @Schema(description = "候选人名称", example = "李翠花")
        @get:JSONField(name = "candidate_name")
        @set:JSONField(name = "candidate_name")
        var candidateName: String = "",
        @Schema(description = "投票结果", example = "success")
        val result: String = "",
        @Schema(description = "投票人", example = "李明")
        val voter: String = "",
        @get:JSONField(name = "game_role")
        @set:JSONField(name = "game_role")
        @Schema(description = "游戏角色", example = "")
        var gameRole: String = ""
)

@Schema(description = "投票结果信息")
data class GetVoteResult (
        @Schema(description = "房间ID", example = "69d4697b96654071a6cc29880ecb5de0")
        val id: String = "",
        @Schema(description = "游戏类型(find_ai_1、find_ai_2、find_ai_3)", example = "find_ai_3")
        @get:JSONField(name = "game_type")
        @set:JSONField(name = "game_type")
        var gameType: String = "",
        @Schema(description = "玩家列表")
        val players: List<Player> = mutableListOf(),
        @Schema(description = "投票结果")
        val votes: List<Vote> = mutableListOf()
)

data class GetVoteResultResponse (
        var code: Int = 0,
        var msg: String = "",
        var results: GetVoteResult
)
